Repository navigation
[CI][ROCm] Check AMD monokernels stage by stage against float64 references - #63486
Draft
AndreasKaratzas wants to merge 14 commits into
Draft
AndreasKaratzas wants to merge 14 commits into
AndreasKaratzas wants to merge 14 commits into
Conversation
Move the DeepSeek-V4.1 (gfx950 and gfx942), Kimi-K3 specialized decode and MiniMax-M3 MonoKernel steps into .buildkite/test_areas/monokernels.yaml, each with curated source_file_dependencies, and extend their tests: DSpark draft layers, FULL CUDA graphs, step-width and short-context sweeps, KV-record writes, index-source and engagement checks for DSv4.1; e2e replay, multi-width and multi-step K1, hostile routing and per-layer checks against vLLM for Kimi-K3; launch/epoch engagement, EAGLE3 aux states, width sweeps and stock/mono transitions for MiniMax-M3. Add nightly real-checkpoint gsm8k configs whose post-eval check proves the monokernel ran, and an AGENTS.md rule requiring a group here for new AMD monokernels. Co-authored-by: Claude <noreply@anthropic.com> Signed-off-by: Andreas Karatzas <akaratza@amd.com>
Contributor
|
This pull request has merge conflicts that must be resolved before it can be |
…el_tests Signed-off-by: Andreas Karatzas <akaratza@amd.com> # Conflicts: # .buildkite/test_areas/models_basic.yaml
…ences Rework the monokernels test area so each AMD monokernel has exactly two steps: a blocking Mono I/O step that checks every fused stage against a slow plain-torch float64 reference (shared tests/models/mono_reference.py and device-primitive conformance in test_mono_primitives.py), plus one engine parity smoke, and a nightly Mono E2E step with real-checkpoint GSM8K and an engagement check. Covers DeepSeek-V4.1 (gfx950 and gfx942), the new DeepSeek-V4-Pro mono decode layer, Kimi-K3 and MiniMax-M3; consolidates the GSM8K configs under configs/monokernels/ and updates the AGENTS.md rule. Co-authored-by: Claude <noreply@anthropic.com> Signed-off-by: Andreas Karatzas <akaratza@amd.com>
…no gsm8k thresholds Co-authored-by: Claude <noreply@anthropic.com> Signed-off-by: Andreas Karatzas <akaratza@amd.com>
….1 mono tests Co-authored-by: Claude <noreply@anthropic.com> Signed-off-by: Andreas Karatzas <akaratza@amd.com>
Conflict in models_basic.yaml: this branch moves the AMD monokernel steps to monokernels.yaml, and main (vllm-project#61482) added a DeepSeek-V4-Pro mono decode layer with its own steps there. Those move too, into a DeepSeek-V4-Pro group in monokernels.yaml: host checks (test_dsv4_mono_decode.py, previously in the Basic Models AMD mirror) on MI355 and main's 8-GPU numerics step under its key, with curated source_file_dependencies. Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Andreas Karatzas <AndreasKaratzas@users.noreply.github.com>
…el_tests Co-authored-by: Claude <noreply@anthropic.com> Signed-off-by: Andreas Karatzas <akaratza@amd.com>
…rge) Keep the DeepSeek-V4-Pro Mono I/O and Nightly E2E steps, which already run test_dsv4_mono_decode.py, test_dsv4_mono_layers.py and test_dsv4_mono_numerics.py, and fold the extra source_file_dependencies of vllm-project#61482's steps into the I/O step. Co-authored-by: Claude <noreply@anthropic.com> Signed-off-by: Andreas Karatzas <akaratza@amd.com>
…evisions Co-authored-by: Claude <noreply@anthropic.com> Signed-off-by: Andreas Karatzas <akaratza@amd.com>
Contributor
|
This pull request has merge conflicts that must be resolved before it can be |
This was referenced Oct 27, 2026
This was referenced Oct 27, 2026
…hmetic Engine smokes compare each stage with vLLM's own op on the kernels' inputs, force routing and index top-k near-ties identical, and bound the remaining differences from formats and roundings. Instruction accuracies follow the CDNA3/CDNA4 ISA. Kimi-K3's K2 tests compile on every rank before launching. Co-authored-by: Claude <noreply@anthropic.com> Signed-off-by: Andreas Karatzas <akaratza@amd.com>
…el_tests Conflicts: main reflowed the moved DSv4.1 gfx942 and models_basic commands; keep the moves and take main's layout and its Kimi-K3 prefix-cache ignore. Main now type-checks tests/models/kimi_k3 and minimax_m3: type the MiniMax runner and metadata, and spell out a Kimi-K3 reference call. Co-authored-by: Claude <noreply@anthropic.com> Signed-off-by: Andreas Karatzas <akaratza@amd.com>
The test sets VLLM_ROCM_USE_AITER after vllm._aiter_ops may already be imported (the metadata import mypy needs loads it at collection), so the in-process executor read stale gates and chose a FileStore that AITER's custom all-reduce rejects. Refresh the gates after setting the env. Co-authored-by: Claude <noreply@anthropic.com> Signed-off-by: Andreas Karatzas <akaratza@amd.com>
Contributor
|
This pull request has merge conflicts that must be resolved before it can be |
…el_tests Main's vllm-project#64101 adds DSv4.1 mono decode at TP8 with its own blocking step and TP8 cases in the tests this branch moved; fold them into the moved tests and run them in the DSv4.1 Mono I/O (now mi355_8) and Nightly steps. Main's vllm-project#64008 launches the mono kernels through _run_compiled, so the numerics test taps K1 there instead of wrapping the launcher. Co-authored-by: Claude <noreply@anthropic.com> Signed-off-by: Andreas Karatzas <akaratza@amd.com>
…el_tests Co-authored-by: Claude <noreply@anthropic.com> Signed-off-by: Andreas Karatzas <akaratza@amd.com>
4 tasks done
Contributor
|
This pull request has merge conflicts that must be resolved before it can be |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
monokernels.yaml: one test area for every AMD monokernel (DeepSeek-V4.1 on MI355 and MI300, DeepSeek-V4-Pro, MiniMax-M3, Kimi-K3), each with exactly two steps: a blockingMono I/Ostep and an optional[Nightly] Mono E2Estep, with curatedsource_file_dependencies; the existing steps move here frommodels_basic.yamlandkernels.yamlmono_reference.pyandtest_mono_primitives.py: a shared float64 plain-torch reference and checks of every device primitive the kernels share (transcendentals, scaled MFMAs, MXFP8/MXFP4 codes and rounding)final_rpc_checks,monokernel_checks.py); thresholds are 3 binomial standard errors below the mono-off accuracytests/models/deepseek_v41/amd_specialized_decode/, next to Kimi-K3's and MiniMax-M3'sAGENTS.md: a PR adding an AMD monokernel adds these two steps (or extends the model's), asserts accuracy rather than which code path ran, derives its tolerances, and passes 10 times in a row before submissionMonokernels landed on AMD for DeepSeek-V4.1 (#60397, #61082, #62131, #60731), Kimi-K3 (#60683), MiniMax-M3 (#62712, #62994) and DeepSeek-V4-Pro (#61482). Their CI was spread over three test areas, missed files the kernels read, compared mostly against vLLM's stock path with tolerances measured from that comparison, and could not tell whether the monokernel ran at all. Checking each stage against a slow, exact reference found two kernel bugs, each fixed in its own PR. Both are merged:
stage_combinereadsklenwithout waiting onkrdy; a shorter stale value corrupts 3,791 of 8,704 attention-output codes and a longer one hangs the step.The architectural side is discussed on the RFC, #60904. Related open PRs: #63398 replaces MiniMax-M3's MonoKernel with ATOM's full-layer implementation, and #60833 adds a Qwen3.8 mono decode; both would get their steps here.
Hardware. Blocking steps use synthetic weights. Measured on MI355X, each fully triggered run costs about 3.3 GPU-h (DeepSeek-V4.1 14 min on 4 GPUs, DeepSeek-V4-Pro 7.5 min on 8, MiniMax-M3 7 min on 4, Kimi-K3 7 min on 8). DeepSeek-V4-Pro and Kimi-K3 need a whole
mi355_8, and none of the steps fitmi355_dpx. The gsm8k runs of the four DeepSeek/Kimi configs took 2.2-3.0 GPU-h each (about 10 GPU-h per night), plus the two MiniMax-M3 configs and the nightly parity tests. New checkpoint storage per HF cache:moonshotai/Kimi-K3deepseek-ai/DeepSeek-V4-Prodeepseek-ai/DeepSeek-V4.1-Flashamd/MiniMax-M3-MXFP4Inferact/Kimi-K3-DSparkInferact/MiniMax-M3-EAGLE3Validation. On 8x MI350X with the CI pins (AITER v0.1.26, FlyDSL 0.4.0), each MI355
Mono I/Ostep passed 10 times in a row, and each[Nightly] Mono E2Estep passed once with every gsm8k config above its threshold. The MI300 steps have not run (no gfx942 here), so their derived bounds are unvalidated on hardware. Engine smokes no longer compare whole layers: each stage runs vLLM's own op on the kernels' inputs, routing and index top-k near-ties are forced identical, and every observed difference sits within one or two ulps of the derived budget. Along the way:AI assistance (Claude Code) was used to draft this change. Every line was reviewed by the submitter.